﻿using Castle.ActiveRecord;
using Financial.Infra.DDD;
using Financial.Core.Modulos.ModuloUsuario;
using Financial.Core.Modulos.ModuloDebito;
using System.Collections.Generic;

namespace Financial.Core.Modulos.ModuloDevedor
{
    [ActiveRecord]
    public class Devedor : IIdentifiable
    {
        [PrimaryKey]
        public int Id { get; set; }

        [Property]
        public string DEV_STR_NOME { get; set; }

        [Property]
        public string DEV_STR_EMAIL { get; set; }

        [BelongsTo("DEV_ID_USUARIO")]
        public Usuario Usuario { get; set; }

        [Property]
        public bool DEV_BIT_ATIVO { get; set; }

        [HasMany(MapType = typeof(Debito), Lazy = true, Inverse = true)]
        public IList<Debito> Debito { get; set; }

    }
}
